﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using Badhshala.Models;

namespace Badhshala
{
    public static class GlobalConstants
    {
        public static string AppID = ConfigurationManager.AppSettings["AppID"];
        public static string AppSecret = ConfigurationManager.AppSettings["AppSecret"];
        public static string AppUrl = ConfigurationManager.AppSettings["AppUrl"];
        public static string FacebookPermissions = ConfigurationManager.AppSettings["FacebookPermissions"];

        public static int InitialCredits
        {
            get
            {
                SlotMachineDBEntities ctx = new SlotMachineDBEntities();
                return int.Parse(ctx.Settings.First(s => s.Name == "InitialCredits").Value);
            }
        }

        public static int CreditForEachFriendRequest
        {
            get
            {
                SlotMachineDBEntities ctx = new SlotMachineDBEntities();
                return int.Parse(ctx.Settings.First(s => s.Name == "CreditForEachFriendRequest").Value);
            }
        }

        public static int CreditForWallPost
        {
            get
            {
                SlotMachineDBEntities ctx = new SlotMachineDBEntities();
                return int.Parse(ctx.Settings.First(s => s.Name == "CreditForWallPost").Value);
            }
        }

        public static int CreditToEnterLottery
        {
            get
            {
                SlotMachineDBEntities ctx = new SlotMachineDBEntities();
                return int.Parse(ctx.Settings.First(s => s.Name == "CreditToEnterLottery").Value);
            }
        }

        public static int AllDifferentCredits
        {
            get
            {
                SlotMachineDBEntities ctx = new SlotMachineDBEntities();
                return int.Parse(ctx.Settings.First(s => s.Name == "AllDifferentCredits").Value);
            }
        }

        public static int AllSameCredits
        {
            get
            {
                SlotMachineDBEntities ctx = new SlotMachineDBEntities();
                return int.Parse(ctx.Settings.First(s => s.Name == "AllSameCredits").Value);
            }
        }

        public static int TwoSameCredits
        {
            get
            {
                SlotMachineDBEntities ctx = new SlotMachineDBEntities();
                return int.Parse(ctx.Settings.First(s => s.Name == "TwoSameCredits").Value);
            }
        }        
    }
}